<?php
/**
 *  List of active  users
 * @file view/user/activeuser.php
 * 
 */
?>

<?php 
$datahead = array(
    'account_name' => 'Users',
    //'last_activity' => '',
    );
?>

<link rel="stylesheet" type="text/css" href="<?php echo base_url('skin/css/admin.css');?>" />
<div id="tabs-4" class="ui-tabs-panel ui-widget-content ui-corner-bottom" aria-labelledby="ui-id-4" role="tabpanel" aria-hidden="false">
    <table>
        <thead>
            <tr>
                <?php foreach ($datahead as $key => $value):?>
                <th><?php echo $value;?></th>
                <?php endforeach;?>
            </tr>
        </thead>
        <tbody>
            <?php if ($activeuser && is_array($activeuser)):?>
            <?php $i=0;foreach($activeuser as $key => $data) : ?>
            <tr<?php echo (($i%2)==0)?' style="background-color: #eee;"':'';?>>
                <?php foreach ($datahead as $key => $value):?>
                <td><?php echo $data->$key; ?></td>
                <?php endforeach;?>
            </tr>
            <?php $i++;endforeach; ?>
            <?php else: ?>
                <?php // THis must not happen since YOU as in YOU are the one ACTIVE ?>
                <tr style="background-color: #eee;">>
                <td>No Active user</td>
            </tr>
            <?php endif; ?>
        </tbody>  
    </table>
</div>
